package com.example.safeassistan.train.adapter;


import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.example.safeassistan.R;
import com.example.safeassistan.train.model.TrainTestListModel;
import java.util.List;


public class TrainSimulateListAdapter extends BaseQuickAdapter<TrainTestListModel.ResultDTO.RecordsDTO, BaseViewHolder> {

    public TrainSimulateListAdapter(List<TrainTestListModel.ResultDTO.RecordsDTO> data) {
        super(R.layout.item_train_simulate_list, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, TrainTestListModel.ResultDTO.RecordsDTO item) {
        helper.setText(R.id.tvPaperTitle,item.getPaperName());
        helper.setText(R.id.tvTotalTime,"时长："+item.getUseTime()+"分钟");
        helper.setText(R.id.tvTatalScore,"总分："+item.getTotalScore()+"分");
        helper.setText(R.id.tvPaperInfo,"共"+item.getKnowNum()+"个知识点 | "+item.getAnswerNum()+"人已做");
        helper.setText(R.id.tvTestCount,"已经做过"+item.getAnswerNum()+"次");
    }
}
